package com.yoyoyo666.report.model.common;

import java.util.List;

public class ListResult<T> extends BaseResult {


    private List<T> data;

    public static <T> ListResult<T> getSuccess(List<T> data){
        ListResult<T> s = new ListResult();
        s.setData(data);
        s.setResult(true);
        s.setCode(0);
        return s;
    }

    public static <T> ListResult<T> getFailResult(){
        ListResult<T> s = new ListResult();
        s.setResult(false);
        s.setCode(1);
        return s;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
